# Dockerfile
FROM node:16-alpine

WORKDIR /app

# 复制package文件
COPY server/package.json ./
COPY server/package-lock.json ./

# 安装依赖
RUN npm install --production

# 复制应用代码
COPY server/ ./server/

# 设置工作目录
WORKDIR /app/server

# 暴露端口
EXPOSE 7001

# 启动应用
CMD ["npm", "start"]